import request from '@/utils/request'

// 分页获取房东列表
export function getLandlordApi(pageNum, pageSize, landlord) {
    return request({
        url: '/sys/landlord',
        method: 'get',
        params: { pageNum, pageSize, landlord }
    })
}
// 获取手续费
export function getChargeApi() {
    return request({
        url: '/sys/landlord/serviceCharge',
        method: 'get',
    })
}
// 禁用单一房东
export function putActiveApi(id, isActive) {
    return request({
        url: `/sys/landlord/active/${id}/${isActive}`,
        method: 'put',
    })
}
// 设置单一手续费
export function putChargeApi(id, chargeItem) {
    return request({
        url: `/sys/landlord/charge/${id}/${chargeItem}`,
        method: 'put',
    })
}
// 设置是否支持切换充值方式
export function putSupportApi(id, isSupport) {
    return request({
        url: `/sys/landlord/support/${id}/${isSupport}`,
        method: 'put',
    })
}
// 设置是否批量禁用 启用房东
export function putActiveMoreApi(data) {
    return request({
        url: `/sys/landlord/active`,
        method: 'put',
        data
    })
}
// 设置是否批量禁用 启用房东
export function putSupportMoreApi(data) {
    return request({
        url: `/sys/landlord/support`,
        method: 'put',
        data
    })
}
// 设置批量手续费
export function putChargeMoreApi(data) {
    return request({
        url: `/sys/landlord/charge`,
        method: 'put',
        data
    })
}